#include "databasemanager.h"
#include <QDebug>

DatabaseManager& DatabaseManager::instance()
{
    static DatabaseManager instance;
    return instance;
}

bool DatabaseManager::initialize()
{
    database = QSqlDatabase::addDatabase("QSQLITE");
    database.setDatabaseName("image_inpainting.db");
    
    if (!database.open()) {
        qDebug() << "Error: Could not open database";
        return false;
    }
    
    qDebug() << "Database initialized successfully";
    return true;
}
